const ObjectToArray = (obj) => Object.keys(obj).map(k => ({value: k, label: obj[k]}))
/**
 * 
    1: '随机',
    2: '下铺',
    3: '中铺',
    4: '上铺',
    5: '中下铺',
    6: '靠窗',
    7: '靠过道',
    8: '座位A',
    9: '座位B',
    10: '座位C',
    11: '座位D',
    12: '座位F',
    13: '无座'
 */
export const SEAT_TYPE_CN = {
	1: '随机',
	2: '下铺',
	3: '中铺',
	4: '上铺',
	5: '中下铺',
	6: '靠窗',
	7: '靠过道',
	8: '座位A',
	9: '座位B',
	10: '座位C',
	11: '座位D',
	12: '座位F',
	13: '无座'
}
const SEAT_TYPE = {
	1: "خالىغان ئورۇن",
	2: "ئاستى كارۋات",
	3: "ئوتتۇر كارۋات",
	4: "ئۈستى كارۋات",
	5: "ئاستى ئوتتۇر كارۋات",
	6: "دېرىزە تەرەپ",
	7: "كاردور تەرەپ",
	8: "ئا ئورۇن",
	9: "بى ئورۇن",
	10: "سى ئورۇن",
	11: "دى ئورۇن",
	12: "في ئورۇن",
	13: 'ئۇرۇنسىز ：بالىلار بىلىتىگە قارتىلغان'
}

const SEAT_TYPE_ARRAY = ObjectToArray(SEAT_TYPE)
const ORDER_TABS = {
    3: '违章',
    4: '电费',
    5: '话费',
    6: '流量',
	7: '火车票',
    8: '机票'
}
const ORDER_TABS_ARRAY = ObjectToArray(ORDER_TABS)
const ILLEGAL_ORDER_TYPE = 3
const ELECTRICITY_ORDER_TYPE = 4
const TELEPHONE_CHARGES_ORDER_TYPE = 5
const TRAFFIC_ORDER_TYPE = 6
const ORDER_STATUS = {
    0: '处理中',
    1: '缴款成功',
    2: '缴款失败'
}
const ORDER_STATUS_ARRAY = ObjectToArray(ORDER_STATUS)
const PAY_STATUS = {
    0: '未支付',
    1: '支付成功',
    2: '支付失败',
    3: '支付取消',
    4: '退款'
}
const PAY_STATUS_ARRAY = ObjectToArray(PAY_STATUS)
export {
    SEAT_TYPE, // 火车座位类型
    SEAT_TYPE_ARRAY,
    ORDER_TABS, // 订单页面Tabs
    ORDER_TABS_ARRAY,
    ILLEGAL_ORDER_TYPE, // 违章type
    ELECTRICITY_ORDER_TYPE, // 电费type
    TELEPHONE_CHARGES_ORDER_TYPE, // 话费type
    TRAFFIC_ORDER_TYPE, // 流量type
    ORDER_STATUS, // 订单状态
    ORDER_STATUS_ARRAY,
    PAY_STATUS, // 支付状态
    PAY_STATUS_ARRAY
}
